package com.hymns.domain;


public class Hymn implements Comparable<Hymn> {
	private String _number;
	private String _title;
	private String _content;
	private String _file;

	public String get_Number() {
		return _number;
	}

	public void set_Number(String number) {
		this._number = number;
	}

	public String get_Title() {
		return _title;
	}

	public void set_Title(String tile) {
		this._title = tile;
	}

	public String get_Content() {
		return _content;
	}

	public void set_Content(String content) {
		this._content = content;
	}

	public String get_File() {
		return _file;
	}

	public void set_File(String _file) {
		this._file = _file;
	}
	
	public String get_FormatedTitle() {
		return String.format("%s - %s", _number, _title);
	}
	
	public int get_NumberAsInt(){
		return Integer.parseInt(_number);
	}

	public int compareTo(Hymn arg0) {
		
		if(this.get_NumberAsInt() == arg0.get_NumberAsInt()){
			return 0;
		}
		if(this.get_NumberAsInt() < arg0.get_NumberAsInt()){
			return -1;
		}else{
			return 1;
		}
	}
}
